﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using System.Data;

namespace _测试接受URL返回值
{
    class Program
    {
        static void Main(string[] args)
        {
            string url = "url地址";
            Uri httpuri = new Uri(url);
            HttpWebRequest httpReq = (HttpWebRequest)WebRequest.Create(httpuri);
            HttpWebResponse httpResp = (HttpWebResponse)httpReq.GetResponse();
            Stream respStream = httpResp.GetResponseStream();
            StreamReader respStreamReader = new StreamReader(respStream, Encoding.UTF8);
            string strBuff = respStreamReader.ReadToEnd();
            Console.WriteLine(strBuff);

            List<Dictionary<string, object>> dt = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(strBuff);
            
            ResultData data = JsonConvert.DeserializeObject<ResultData>(strBuff);

            Console.ReadKey();
        }


        public class ResultData
        {
            public string message { get; set; }
            public string status_code { get; set; }
            public data data { get; set; }
        }

        public class data
        {
            public string result { get; set; }
            public string message { get; set; }
        }



    }
}
